# -*- coding: utf-8 -*-
"""
Created on Tue Jun  5 21:16:41 2018

@author: sun haiyang
"""
#%%

# the code below is the result filepath of kinds of modality
zpet_dirpath = r'/media/root/Elements4/XuanWu_last_stat/PET_processing/PET_SN_SR_del-subj24_z'
zcbf_dirpath = r'/media/root/Elements4/XuanWu_last_stat/CBF_processing/CBF_clear_background_SN_SR_del-subj24_z'
zfalff_dirpath = r'/media/root/Elements4/XuanWu_last_stat/BOLD_processing/fALFF_del-subj24_z'
#zperalff_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002_origin/BOLD_processing/PerAF'
zreho_dirpath = r'/media/root/Elements4/XuanWu_last_stat/BOLD_processing/ReHo_del-subj24_z'
zdc_dirpath = r'/media/root/Elements4/XuanWu_last_stat/BOLD_processing/Dpb_sm-6_del-subj24_z'

#the code below is the groupmask filepath of kinds of modality
gray_region_mask_dirpath = r'/media/root/Elements4/XuanWu_last/mask/GM_mask/intersect_mask'
#此文件夹下是p=0.4/0.5...0.9的文件夹，而p=0.4这个文件夹下是region=1 2 3...7的文件夹，1文件夹下是26个subject的mask

output_dirpath = r'/media/root/Elements4/XuanWu_last_stat/across_spatial/GM_mask'

#the code below is the used as the excel title.
column_name_list = ['1st_modality_rm','2nd_modality_rm','p_coeff','p_pvalue','p_coeff_fishz','s_coeff','s_pvalue','s_coeff_fishz','voxelNUM','subjectID','modality','region','GM_Probability'] #must set value ,even set column_name_list =[]

grouppath_dict = {'PETvsCBF':[zpet_dirpath,zcbf_dirpath,gray_region_mask_dirpath,output_dirpath],\
                  'PETvsfALFF':[zpet_dirpath,zfalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'PETvsReHo':[zpet_dirpath,zreho_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'PETvsDC':[zpet_dirpath,zdc_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBFvsfALFF':[zcbf_dirpath,zfalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBFvsReHo':[zcbf_dirpath,zreho_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBFvsDC':[zcbf_dirpath,zdc_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 }
print('grouppath_dict:',grouppath_dict)

from agilepipe.statics.acrossvoxelgroupcorrelate_pear_spear_fishz import Multi_across_voxel_correlate
Multi_across_voxel_correlate([grouppath_dict,column_name_list])


#%%
#
#from agilepipe.statics.summarize import Summarize
#
#excel_path = r'/media/root/Elements4/XuanWu_last_stat/across_spatial/Stanford_three_modality_GM/across_voxel_correlate_Stanford_tm_GM.xlsx'
#summarize = Summarize(excel_path)
#print('before del')
#del summarize
#print('after del')

#%%
#from agilepipe.statics.summarize import Rearrange
#
#rg_excel_filepath = r'C:\Users\Administrator\Desktop\2018-09-01\across_spatial\Stanford\across_voxel_correlate_Stanford.xlsx'
#gm_excel_filepath = r'C:\Users\Administrator\Desktop\2018-09-01\across_spatial\three_modality_GM\across_voxel_correlate_tm_GM.xlsx'
#output_dirpath = r'C:\Users\Administrator\Desktop\2018-09-01\across_spatial'
#Rearrange(rg_excel_filepath,gm_excel_filepath,output_dirpath)

#%%







#%%
